/*
	Copyright 2013 Roman Tudor

	This file is part of numbrsLib.

    numbrsLib is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    numbrsLib is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with numbrsLib.  If not, see <http://www.gnu.org/licenses/>.
 */
package roman.tudor.numbrsLib.extras;

/**
 * A class that manipulates strings.
 * @author <a href="http://romantudorioan.wordpress.com">Tudor Roman</a>
 * @since 2013
 * @version 2.0
 */
public class Lettrs {
	/**
	 * A function that returns the char at an index.
	 * @param string as String
	 * @param i
	 * @return string.charAt(i)
	 */
	public static char returnChar(String string, int i){
		char returnChar_char;
		try{
			returnChar_char = string.charAt(i - 1);
			return returnChar_char;
		} catch(java.lang.StringIndexOutOfBoundsException e)
		{
			return "!".charAt(0);
		}
	}
}
